<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="mt" uri="http://tanghom.cn/mytags"%>
<!DOCTYPE html>
<html lang="en">
<head>
<jsp:include page="../../header.jsp" />
</head>
<body>
<div class="container-fluid">
	<div class="page-header clearfix">
 		<div class="pull-left">
       		<a href="javascript:window.location.reload();" class="btn btn-link btn-xs"><i class="icon-refresh"></i> 刷新页面</a>
      	</div>
     	<div class="pull-right crumbs">
     		<i class=" icon-map-marker"></i> <span>当前位置：角色管理</span>
      	</div>
    </div>
 	  <div class="container-panel">
 	 	<div class="tool-view">
 	 		<div class="clearfix">
	 	 		<div class="pull-left">
					<a href="${pageContext.servletContext.contextPath}/role/add.shtml">
						<span class="btn btn-success btn-sm">新增角色</span>
					</a>
	 	 		</div>
	 	 		<div class="pull-right">
				  <form action="" method="post" class="form-inline">
					  <div class="form-group">
			              <span>名称:</span>
			              <input type="text" class="form-control input-sm" name="name" placeholder="名称">
			            </div>
			            <div class="form-group">
			              <span>唯一KEY:</span>
			              <input type="text" class="form-control input-sm" name="key"placeholder="唯一KEY">
			            </div>
			             <div class="form-group">
		      		            <button type="submit" class="btn btn-primary btn-sm">立即搜索</button>
			            </div>
					</form>
	 	 		</div>
 	 		</div>
		</div>
				
 	 	<div class="content">
          <table class="table table-bordered table-condensed">
             <thead>
              <tr>
                <th>名称</th>
                <th>唯一KEY</th>
                <th>描述</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody>
            <c:forEach var="items" items="${page.items}" varStatus="s">
              <tr>
                <td>${items.name}</td>
                <td>${items.key}</td>
                <td>${items.description}</td>
                <td>
					<a href="${pageContext.servletContext.contextPath}/role/edit.shtml?id=${items.id}" class="label label-success">编辑</a>
					<a href="${pageContext.servletContext.contextPath}/role/delete.shtml?id=${items.id}" data-info="确认删除吗?" class="confirm ajax-get label label-danger">删除</a>
					<a href="${pageContext.servletContext.contextPath}/resources/permissions.shtml?roleId=${items.id}" class="label label-warning">授权</a>
				</td>
              </tr>
			</c:forEach>
            </tbody>
          </table>
          <div class="clearfix">
 	 		<div class="pull-left">
 	 			 <div class="btn-group">
				    <button type="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown">
				      	其他操作
				      <span class="caret"></span>
				    </button>
				    <ul class="dropdown-menu">
				      <li><a href="#">排序</a></li>
				      <li><a href="#">禁用</a></li>
				      <li><a href="#">删除</a></li>
				    </ul>
				  </div>
 	 		</div>
 	 		<div class="pull-right">
	           	 <mt:pager pageSize="${page.pageSize}" pageNo="${page.curIndex}" url="" recordCount="${page.rowsCount}" />
 	 		</div>
            </div>
      	</div>
   	</div>
</div>
</body>
</html>
